package com.mrroman.linksender.sender;

public class MessageEvent {

    public enum EventType {
        MESSAGE,
        INFO,
        ERROR
    };

    private EventType event;
    private Message message;

    public MessageEvent(EventType event, Message message) {
        this.event = event;
        this.message = message;
    }

    public MessageEvent(EventType event, String sender, String message) {
        this.event = event;
        this.message = new Message(sender, message);
    }

    public MessageEvent(Message message) {
        this.event = EventType.MESSAGE;
        this.message = message;
    }

    public EventType getEvent() {
        return event;
    }

    public Message getMessage() {
        return message;
    }
}
